import {defineStore} from "pinia";
export const tokenStore =defineStore(
    'token',
    {
        state: ()=>{
            return {token: localStorage.getItem('token')}
        },
        actions:{
            update(token){
                this.token=token;
                localStorage.setItem('token',token)
            }
        }
    }
)